<template>
	<view>
		<uv-tabs :list="tabList" bg-color="var(--ui-BG)" font-size="28"
		:activeStyle="{
			color: 'var(--ui-TC)',
			fontWeight: 'bold',
			transform: 'scale(1.05)'
    	}"
		:inactiveStyle="{
			color: 'var(--ui-TC-2)',
			transform: 'scale(1)'
		}"   :is-scroll="false" v-model="current" @change="change"></uv-tabs>
	</view>
</template>

<script>
	export default {
		components: {
			
		},
		props: {
			currentValue: {
				type: Number,
				default: 0
			},
			tabList: {
				type: Array,
				default: () => []
			},
		},
		data() {
			return {
				
			}
		},
		computed: {
			current: {
				get() {
				    return this.currentValue;
				},
				set(newValue) {
					this.$emit('change', newValue);
				}
			},
		},
		methods: {
			change(index) {
				if (this.tabList[index]) {
					this.$emit('change', index);
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.tab-box {
		background-color: #fff;
		padding: 5px 0;
	}
</style>